<template>
  <div>
    <h1>父组件</h1>
    <h3>{{money}}</h3>
    <hr>
    <Song v-model:money="money"/>
  </div>
</template>

<script>
import Song from "./song.vue";
import {ref} from 'vue'
export default {
name:"App",
components:{
Song
},
// 父传子
setup() {
    const money =ref(100)
    const changeMoney=((newMoney)=>{
      money.value=newMoney
      console.log(money.value)
    })
    return {
        money,
        changeMoney
    }
},
}
</script>

<style>

</style>